package com.yupi.oj.model.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;

/**
 * 做题提交记录表
 *
 * @TableName question_submit_log
 */
@TableName(value = "question_submit_log")
@Data
public class QuestionSubmitLog implements Serializable {
    /**
     * id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 题目ID
     */
    @TableField(value = "questionId")
    private Long questionId;

    /**
     * 提交语言
     */
    @TableField(value = "submitLanguage")
    private String submitLanguage;

    /**
     * 代码详情
     */
    @TableField(value = "codeDescription")
    private String codeDescription;

    /**
     * 内存消耗（KB）
     */
    @TableField(value = "memoryConsume")
    private Integer memoryConsume;

    /**
     * 执行时间（ms）
     */
    @TableField(value = "executeTime")
    private Integer executeTime;

    /**
     * 代码长度(bytes)
     */
    @TableField(value = "codeLength")
    private Double codeLength;

    /**
     * 提交结果状态；0.编译中；1.正确；2.错误；3.编译错误
     */
    @TableField(value = "submitStatus")
    private String submitStatus;

    /**
     * 错误信息
     */
    @TableField(value = "errorInfo")
    private String errorInfo;

    /**
     * 创建用户
     */
    @TableField(value = "createBy")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "createTime")
    private Date createTime;

    /**
     * 修改用户
     */
    @TableField(value = "updateBy")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "updateTime")
    private Date updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "isDelete")
    @TableLogic
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}